import 'package:flutter/foundation.dart';

class LogUtil {
  static const tag = "人大人";

  static void d(Object message) {
    _printLog('${tag}Debug -> ', message);
  }

  static void i(Object? message) {
    _printLog('${tag}Info -> ', message.toString());
  }

  static void e(Object message, {Exception? e}) {
    _printLog('${tag}Error -> ', "$message${e?.toString()}");
  }

  static void _printLog(String level, Object message) {
    StringBuffer sb = StringBuffer();
    sb
      ..write(level)
      ..write(message);
    if (kDebugMode) {
      print(sb.toString());
    }
  }
}
